export const getTopHeight = () => {
  let statusBarHeight = 30
  if (uni.getSystemInfo) {
    uni.getSystemInfo({
      success: (res) => {
        statusBarHeight = res.statusBarHeight || 25
      },
    })
  } else {
    statusBarHeight = /Android/i.test(navigator.userAgent) ? 25 : 20
  }
  return statusBarHeight
}
